import { Entity, Column } from 'typeorm';
import { Base } from './base.entity';
import { ApiProperty } from '@nestjs/swagger';
import { ChargeRecord } from './charge_record.entity';
import { User } from './user.entity';

@Entity({
  name: 'chat_room',
})
export class ChatRoomEntity extends Base {
  @Column({ length: 20, default: '' })
  @ApiProperty({ title: '房间名' })
  roomName: string;

  @Column({ length: 36 })
  @ApiProperty({ title: 'userId' })
  userId: string;
  @Column({ length: 36 })
  @ApiProperty({ title: 'ownerId' })
  ownerId: string;
  @Column({ length: 36 })
  @ApiProperty({ title: 'roomId' })
  roomId: string;
  @Column({ type: 'tinyint', default: 0 })
  @ApiProperty({ title: '是否开启鉴权' })
  isAsk: number;
  @Column({ type: 'tinyint', default: 1 ,comment:'-1不在线，0在线，1房主不在线，-2踢出'})
  @ApiProperty({ title: 'vip' })
  type: number;
  @Column({ type: 'tinyint', default: 0 })
  @ApiProperty({ title: '管理员' })
  isAdmin: number;
  @Column({ length: 10, default: 'real' })
  @ApiProperty({ title: '角色' })
  role: string;
  @Column({ type: 'tinyint', default: 0 })
  @ApiProperty({ title: '排序', default: 0 })
  sort: number;
  @Column({ type: 'tinyint', default: 0 })
  @ApiProperty({ title: '是否准备', default: 0 })
  ready: number;
  @Column({ type: 'tinyint', default: 0 })
  @ApiProperty({ title: '下一个位置', default: 0 })
  nextButton: number;
}
